package org.example.springboot.service;


import jakarta.annotation.Resource;
import org.example.springboot.entity.Vedio;
import org.example.springboot.entity.WxMember;
import org.example.springboot.mapper.VedioMapper;
import org.example.springboot.mapper.WxMemberMapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WxMemberService {
    @Resource
    private WxMemberMapper wxMemberMapper;

    public List<WxMember> select() {
        return wxMemberMapper.select();
    }

    public void saveOrUpdate(WxMember wxMember) {
        //调用持久层将微信用户保存起来
        wxMemberMapper.save(wxMember);
    }
    // 根据openid查询用户
    public List<WxMember> selectByOpenid(String openid) {
        return wxMemberMapper.selectByOpenid(openid);
    }
}
